package com.sg.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.sg.framework.common.annotations.LikeFlag;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 主表，只有一个版本，表类型（空间独有）
 *
 * @author xxx
 */
@Data
@Accessors(chain = true)
@TableName("oms_achievement")  //3-10-01成果表
public class OmsAchievement implements Serializable {

  @Serial
    private static final long serialVersionUID = 1L;

  /**
   * 成果ID
   */
  @TableId(value = "achievement_id", type = IdType.ASSIGN_UUID)
  @NotNull(message = "achievementId不能为空")
  private String achievementId;

  /**
   * 成果类型ID
   */
  @TableField(value = "achievement_type_id")
  @NotNull(message = "成果类型ID不能为空")
  @Schema(description = "成果类型ID")
  private String achievementTypeId;

  /**
   * 是否存档 TRUE:是 FALSE:否
   */
  @TableField(value = "is_archive")
  @Schema(description = "是否存档")
  private String isArchive;

  /**
   * 成果库类型 RESERVE_WAREHOUSE:预备库 OFFICIAL_LIBRARY:正式库
   */
  @TableField(value = "achive_library_type")
  @NotNull(message = "成果库类型不能为空")
  @Schema(description = "成果库类型")
  private String achiveLibraryType;

  /**
   * 主体生命周期 CURRENTLY_VALID:当前有效 EDITING:正在编辑 ARCHIVING:历史存档
   */
  @TableField(value = "subject_life_cycle")
  @Schema(description = "主体生命周期")
  private String subjectLifeCycle;

  /**
   * 成果类型编号
   */
  @TableField(value = "achievement_type_number")
  @NotNull(message = "成果类型编号不能为空")
  @Schema(description = "成果类型编号")
  private String achievementTypeNumber;

  /**
   * 成果冗余状态 TO_BE_RELEASED:待发布 AUDIT:待审核 TO_BE_CERTIFIED:待认证 CERT_SUCCESS:认证成功 CERT_FAIL:认证失败 ARCHIVING:历史存档
   */
  @TableField(value = "achivement_state_code")
  @Schema(description = "成果冗余状态")
  private String achivementStateCode;

  /**
   * 成果类别ID
   */
  @TableField(value = "achievement_category_id")
  @Schema(description = "成果类别ID")
  private String achievementCategoryId;

  /**
   * 审核人就职记录ID
   */
  @TableField(value = "audit_induction_id")
  @Schema(description = "审核人就职记录ID")
  private String auditInductionId;

  /**
   * 成果类别编号
   */
  @TableField(value = "achievement_category_number")
  @Schema(description = "成果类别编号")
  private String achievementCategoryNumber;

  /**
   * 认证人就职记录ID
   */
  @TableField(value = "authen_induction_id")
  @Schema(description = "认证人就职记录ID")
  private String authenInductionId;

  /**
   * 成果等级ID
   */
  @TableField(value = "achievement_grade_id")
  @Schema(description = "成果等级ID")
  private String achievementGradeId;

  /**
   * 成果等级编号
   */
  @TableField(value = "achievement_grade_number")
  @Schema(description = "成果等级编号")
  private String achievementGradeNumber;

  /**
   * 是否开启转化成果 TRUE:是 FALSE:否
   */
  @TableField(value = "is_use_conversion")
  @NotNull(message = "是否开启转化成果不能为空")
  @Schema(description = "是否开启转化成果")
  private String isUseConversion;

  /**
   * 成果业务等级ID
   */
  @TableField(value = "achievement_business_grade_id")
  @Schema(description = "成果业务等级ID")
  private String achievementBusinessGradeId;

  /**
   * 是否标志性成果 TRUE:是 FALSE:否
   */
  @TableField(value = "is_symbolic_achievements")
  @NotNull(message = "是否标志性成果不能为空")
  @Schema(description = "是否标志性成果")
  private String isSymbolicAchievements;

  /**
   * 成果业务等级编号
   */
  @TableField(value = "achievement_business_grade_number")
  @Schema(description = "成果业务等级编号")
  private String achievementBusinessGradeNumber;

  /**
   * 版权归属对象类型编码 ORGANIZATION:组织 DEPARTMENT:部门 PERSONAL:个人
   */
  @TableField(value = "copyright_object_type_code")
  @NotNull(message = "版权归属对象类型编码不能为空")
  @Schema(description = "版权归属对象类型编码")
  private String copyrightObjectTypeCode;

  /**
   * 成果编号
   */
  @TableField(value = "achievement_number")
  @NotNull(message = "成果编号不能为空")
  @Schema(description = "成果编号")
  private String achievementNumber;

  /**
   * 业绩责任部门ID
   */
  @TableField(value = "duty_dept_id")
  @NotNull(message = "业绩责任部门ID不能为空")
  @Schema(description = "业绩责任部门ID")
  private String dutyDeptId;

  /**
   * 成果名称
   */
  @TableField(value = "achievement_name")
  @NotNull(message = "成果名称不能为空")
  @Schema(description = "成果名称")
  @LikeFlag(likeType = "LIKE")
  private String achievementName;

  /**
   * 成果介绍
   */
  @TableField(value = "achievement_desc")
  @Schema(description = "成果介绍")
  private String achievementDesc;

  /**
   * 成果补充介绍
   */
  @TableField(value = "achievement_add_desc")
  @Schema(description = "成果补充介绍")
  private String achievementAddDesc;

  /**
   * 操作人就职记录ID
   */
  @TableField(value = "operation_induction_id")
  @NotNull(message = "操作人就职记录ID不能为空")
  @Schema(description = "操作人就职记录ID")
  private String operationInductionId;

  /**
   * 成果转化介绍
   */
  @TableField(value = "achievement_conversiont_desc")
  @Schema(description = "成果转化介绍")
  private String achievementConversiontDesc;

  /**
   * 创建人就职记录ID
   */
  @TableField(value = "create_induction_id")
  @NotNull(message = "创建人就职记录ID不能为空")
  @Schema(description = "创建人就职记录ID")
  private String createInductionId;

  /**
   * 相关文号
   */
  @TableField(value = "related_document")
  @Schema(description = "相关文号")
  private String relatedDocument;

  /**
   * 发布人就职记录ID
   */
  @TableField(value = "release_induction_id")
  @Schema(description = "发布人就职记录ID")
  private String releaseInductionId;

  /**
   * 授予单位
   */
  @TableField(value = "awarded_unit")
  @Schema(description = "授予单位")
  private String awardedUnit;

  /**
   * 存档人就职记录ID
   */
  @TableField(value = "archive_induction_id")
  @Schema(description = "存档人就职记录ID")
  private String archiveInductionId;

  /**
   * 授予时间
   */
  @TableField(value = "awarded_time")
  @NotNull(message = "授予时间不能为空")
  @Schema(description = "授予时间")
  private Date awardedTime;

  /**
   * 操作时间
   */
  @TableField(value = "operate_time")
  @NotNull(message = "操作时间不能为空")
  @Schema(description = "操作时间")
  private Date operateTime;

  /**
   * 有效期结束时间
   */
  @TableField(value = "valid_end_time")
  @Schema(description = "有效期结束时间")
  private Date validEndTime;

  /**
   * 创建时间
   */
  @TableField(value = "create_time")
  @NotNull(message = "创建时间不能为空")
  @Schema(description = "创建时间")
  private Date createTime;

  /**
   * 发布时间
   */
  @TableField(value = "release_time")
  @Schema(description = "发布时间")
  private Date releaseTime;

  /**
   * 存档时间
   */
  @TableField(value = "archive_time")
  @Schema(description = "存档时间")
  private Date archiveTime;

  /**
   * 是否作废 TRUE:是 FALSE:否
   */
  @TableField(value = "is_valid")
  @NotNull(message = "是否作废不能为空")
  @Schema(description = "是否作废")
  private String isValid;

  /**
   * 创建于空间ID
   */
  @TableField(value = "space_id")
  @NotNull(message = "创建于空间ID不能为空")
  @Schema(description = "创建于空间ID")
  private String spaceId;

  /**
   * 创建于联盟应用ID
   */
  @TableField(value = "app_id")
  @NotNull(message = "创建于联盟应用ID不能为空")
  @Schema(description = "创建于联盟应用ID")
  private String appId;
}
